package com.slicktechnologies.shared;

import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Index;
import com.simplesoftwares.client.library.appstructure.SuperModel;
import com.simplesoftwares.client.library.appstructure.search.Filter;
import com.simplesoftwares.client.library.appstructure.search.MyQuerry;
import com.simplesoftwares.client.library.mywidgets.ObjectListBox;

@Entity
public class ServiceType extends SuperModel {
	@Index
	protected String typeName;
	protected Double diagnosisAmount;
	protected String diagnosisMessage;
	protected String acknowledgementMessage;
	protected String successFulMessage;
	protected String unsucessFullMessage;
	@Index
	boolean status;

	
	
	
	

	public ServiceType() {
		super();
		typeName="";
		diagnosisAmount=0d;
		diagnosisMessage="";
		acknowledgementMessage="";
		successFulMessage="";
		unsucessFullMessage="";
		
		// TODO Auto-generated constructor stub
	}

	
	
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		if(typeName!=null)
		this.typeName = typeName.trim();
	}

	public Double getDiagnosisAmount() {
		return diagnosisAmount;
	}

	public void setDiagnosisAmount(Double diagnosisAmount) {
		if(diagnosisAmount!=null)
		  this.diagnosisAmount = diagnosisAmount;
	}

	public String getDiagnosisMessage() {
		return diagnosisMessage;
	}

	public void setDiagnosisMessage(String diagnosisMessage) {
		if(diagnosisMessage!=null)
		this.diagnosisMessage = diagnosisMessage.trim();
	}

	public String getAcknowledgementMessage() {
		return acknowledgementMessage;
	}

	public void setAcknowledgementMessage(String acknowledgementMessage) {
		if(acknowledgementMessage!=null)
		this.acknowledgementMessage = acknowledgementMessage.trim();
	}

	public String getSuccessFulMessage() {
		return successFulMessage;
	}

	public void setSuccessFulMessage(String successFulMessage) {
		if(successFulMessage!=null)
		this.successFulMessage = successFulMessage.trim();
	}

	public String getUnsucessFullMessage() {
		return unsucessFullMessage;
	}

	public void setUnsucessFullMessage(String unsucessFullMessage) {
		if(unsucessFullMessage!=null)
		this.unsucessFullMessage = unsucessFullMessage.trim();
	}

	
	public boolean getStatus()
	{
		return this.status;
	}
	
	public boolean setStatus(boolean status)
	{
		return this.status=status;
	}


	/**
	 * 
	 */
	private static final long serialVersionUID = -411012240782888935L;

	@Override
	public boolean isDuplicate(SuperModel m) {
		// TODO Auto-generated method stub
		return false;
	}
	
	public static void makeServiceTypeListBoxLive(ObjectListBox<ServiceType>serviceTypelb)
	{
		Filter filter=new Filter();
		filter.setQuerryString("status");
		filter.setBooleanvalue(true);
		MyQuerry querry=new MyQuerry();
		querry.setQuerryObject(new ServiceType());
		serviceTypelb.MakeLive(querry);
	}
	
	public String toString()
	{
		return this.typeName;
	}

}
